<#include "../../select.ftl" />
<!DOCTYPE html>
<html>
<head>
    <title>系统通知</title>
    <script type="text/javascript">
        function refreshTable(currentPage) {
            if (currentPage) {
                $("input[name=currentPage]").val(currentPage);
            }
            $("#search_notice_table").ajaxSubmit({
                url: '${absoluteContextPath}/system/notice/ajaxList',
                success: function (data) {
                    var data = JSON.parse(data);
                    if (data.returnCode == 1) {
                        $("#tableContent").html(data.content.data);
                    } else {
                        $.showMessage({parentId: "showMessage", message: "表格数据加载异常！", type: "success"});
                    }
                }
            });
        }
    </script>
</head>
<body>

<div class="breadcrumbs">
    <ol class="breadcrumb">
        <li><a href="${absoluteContextPath}/home"><i class="fa fa-home"></i>首页</a></li>
        <li><a href="#">系统管理</a></li>
        <li class="active">系统通知</li>
    </ol>
</div>

<div class="main">
    <!-- row -->
    <div class="row">
        <div class="col-md-12">
            <section class="tile">
                <!-- tile body -->
                <div class="tile-body">
                    <div id="showMessage"><#include "../../message.ftl" /></div>
                    <div class="form-horizontal">
                        <form id="search_notice_table" action="${absoluteContextPath}/system/notice/list" method="post">
                            <input type="hidden" name="pageSize" value="${noticesTable.page.pageSize}"/>
                            <input type="hidden" name="currentPage" value="${noticesTable.page.currentPage}"/>

                            <div class="row">
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">通知标题</label>

                                    <div class="col-sm-8">
                                        <input class="form-control" name="noticeTitle"
                                               value="${noticeParams.noticeTitle!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">通知内容</label>

                                    <div class="col-sm-8">
                                        <input class="form-control" name="noticeContent"
                                               value="${noticeParams.noticeContent!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">是否已阅读</label>

                                    <div class="col-sm-8">
                                    <@select name="isRead" value="${noticeParams.isRead!''}" list=isReadList class="form-control"/>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4"></label>

                                    <div class="col-sm-8">
                                        <button type="button" class="btn btn-primary" onclick="refreshTable(1)">查询
                                        </button>
                                        <button type="reset" class="btn btn-default">重置</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </section>
            <section class="tile">
                <div class="tile-body nopadding">
                    <div class="table-responsive" id="tableContent">
                    <#include "table.ftl"/>
                    </div>
                </div>
            </section>
        </div>
    </div>
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    </div>
    <div class="modal fade" id="cancelModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
         aria-hidden="true">
        <div class="modal-dialog" style="width: 400px; margin: 282.5px auto;">
            <div class="modal-content">
                <div class="modal-body">
                    <div class="text-center modal-tip">
                        <p><input name="noticeContent" id="noticeContent" value="" readonly="readonly"
                                  style="border:0;"></p>

                        <p>
                            <input name="" type="button" id="cancel" class="btn  btn-primary sure" value="确定">&nbsp;
                        </p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
